Open
Conversation
akshayr-hub
reviewed
May 19, 2025
| use super::ThemeColors; | ||
|
|
||
| #[derive(Debug, Clone)] | ||
| pub struct SelectButtonStyles { |
Contributor
There was a problem hiding this comment.
rename to SelectStyles
akshayr-hub
reviewed
May 19, 2025
| pub struct SelectButtonStyles { | ||
| // Colors | ||
| // trigger | ||
| pub button_background: Color, |
akshayr-hub
reviewed
May 19, 2025
| // Colors | ||
| // trigger | ||
| pub button_background: Color, | ||
| pub button_text_color: Color, |
akshayr-hub
reviewed
May 19, 2025
| // trigger | ||
| pub button_background: Color, | ||
| pub button_text_color: Color, | ||
| pub button_border_color: Color, |
akshayr-hub
reviewed
May 19, 2025
| self | ||
| } | ||
|
|
||
| pub fn key<S: Into<String>>(mut self, key: S) -> Self { |
Contributor
There was a problem hiding this comment.
you can also create a common method for this
like key_val() take both key and value
Author
There was a problem hiding this comment.
there are two properties :
label: Option,
key: String,
hence it has two different method
akshayr-hub
reviewed
May 19, 2025
| padding: UiRect::axes(Val::Px(0.0), Val::Px(4.0)), | ||
| ..default() | ||
| }, | ||
| GlobalZIndex(99), |
Contributor
There was a problem hiding this comment.
can you add comment why is z index needed?
akshayr-hub
reviewed
May 19, 2025
| pub selected: bool, | ||
| pub on_change: Option<SystemId<In<bool>>>, | ||
| pub disabled: bool, | ||
| pub key: Option<String>, |
Contributor
There was a problem hiding this comment.
should we rename to label?
akshayr-hub
reviewed
May 19, 2025
| let height = select_button_size_style.min_height; | ||
| let font_size = select_button_size_style.font_size; | ||
|
|
||
| let key = self.key.clone().unwrap_or_else(|| "".to_string()); |
Contributor
There was a problem hiding this comment.
is key is label in terms of html
then if it is not present and value was given
then value will become key?
akshayr-hub
reviewed
May 19, 2025
| height: Val::Px(height), | ||
| ..default() | ||
| }, | ||
| Name::new(self.key.clone().unwrap_or("".to_string())), |
Author
There was a problem hiding this comment.
this is modified to take value if label is not given
70d33ca to
ef2e94d
Compare
akshayr-hub
approved these changes
May 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Select button with drop down options
on an item selection, close drop down
size variants ( extra small , small, medium, large, extra large)
on outside click of select, close drop down
Preview

on trigger of select button & hover on select item

update after styles & size support:
